<template>
  <div>
    <common-head title="个人中心"/>
    <div class="content">
      <img class="avatar" :src="userInfo.avatar" alt="">
      <h3>{{userInfo.name}}</h3>
      <van-button @click="$router.push('/addressLists')">收货地址</van-button>
    </div>
    <my-tabbar/>
  </div>
</template>

<script>
import CommonHead from '../../components/CommonHead.vue'
import MyTabbar from '../../components/MyTabbar.vue'
import { mapState } from 'vuex'
export default {
  components: {
    MyTabbar,
    CommonHead
  },
  computed: {
    ...mapState({
      userInfo: state => state.user.userInfo
    })
  }
}
</script>

    
<style lang="scss" scoped>
.content{
  margin-top: 46px;
  margin-bottom: 50px;
  display:flex;
  flex-direction: column;
  align-items: center;
  .avatar{
    margin: 30px 0;
  }
}
</style>
